import request from "@/utils/request.js";
//登录接口
export const useLoginService = (data) => {
    const params = new URLSearchParams();
    params.append("username",data.username);
    params.append("password",data.password);
    return request.post("/user/login",params)
}
//注册接口
export const useRegisterService = (data)=>{
    return request({
        url:'/user/register',
        method:'post',
        data:data
    })
}

export const useUpdatePasswordService = (newData) =>{
    return request({
        url:'/user/updatePwd',
        method:'put',
        data:newData
    })
}